﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using RGPWEB.App_Code.DAL;
using RGPWEB.App_Code.DAL.HjKisTableAdapters;

namespace RGPWEB.App_Code.BLL
{
    [System.ComponentModel.DataObject]
    public class MCodeSplitBll
    {
        private a_McodeSplitTableAdapter _productsAdapter = null;
        protected a_McodeSplitTableAdapter Adapter
        {
            get
            {
                if (_productsAdapter == null)
                    _productsAdapter = new a_McodeSplitTableAdapter();

                return _productsAdapter;
            }
        }

        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public RGPWEB.App_Code.DAL.HjKis.a_McodeSplitDataTable GetData()
        {
            return Adapter.GetData();
        }

        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public RGPWEB.App_Code.DAL.HjKis.a_McodeSplitDataTable GetGroupName()
        {
            return Adapter.GetGroupName();
        }

        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public RGPWEB.App_Code.DAL.HjKis.a_McodeSplitDataTable GetDataByGroup(string ClassGroup)
        {

            if (ClassGroup =="all")
                return Adapter.GetData();
            else
            return Adapter.GetDataByGroup(ClassGroup);
        }


    }
}
